package org.spring.learn.demo.annotation.injections.value;

import org.junit.Test;
import org.spring.learn.project.entity.Bird;
import org.spring.learn.project.entity.Person;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class MyTest {

    @Test
    public void test(){

        ApplicationContext app = new AnnotationConfigApplicationContext(MyConfig.class);
        System.out.println("IoC容器创建");
        Bird bird=(Bird) app.getBean("bird");
        System.out.println(bird);
    }
}
